import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import FreeCourse from '@/components/FreeCourse'
import LightCourse from '@/components/LightCourse'
import DegreeCourse from '@/components/DegreeCourse'
import QuestionBank from '@/components/QuestionBank'
import LoginCourse from '@/components/user/LoginCourse'
import MyAccount from '@/components/personal/MyAccount'
import MyCoupon from '@/components/personal/MyCoupon'
import MyMessage from '@/components/personal/MYMessage'
import MyOrder from '@/components/personal/MyOrder'
import CourseDetail from '@/components/CourseDetail'

// import OldBoy from '@/components/OldBoy'

Vue.use(Router)

export default new Router({
  mode : 'history',
  routes: [
    {
      path:'/home',
      name:'home',
      component:Home
    },
    {
      path: '/free',
      name: 'FreeCourse',
      component: FreeCourse
    },
    {
      path: '/free/:id/details-introduce',
      name: 'CourseDetail',
      component: CourseDetail
    },
    {
      path: '/light',
      name: 'LightCourse',
      component: LightCourse
    },
    {
      path: '/degree',
      name: 'DegreeCourse',
      component: DegreeCourse
    },
    {
      path: '/bank',
      name: 'QuestionBank',
      component: QuestionBank,
      meta:{
        isRequire:true
      }
    },
    {
      path: '/login',
      name: 'login',
      component: LoginCourse
    },
    {
      path: '/my/account',
      name: 'account',
      component: MyAccount,
      meta:{
        isRequire:true
      }
    },
    {
      path: '/my/coupon',
      name: 'coupon',
      component: MyCoupon,
      meta:{
        isRequire:true
      }
    },
    {
      path: '/my/message',
      name: 'message',
      component: MyMessage,
      meta:{
        isRequire:true
      }
    },
    {
      path: '/my/order',
      name: 'order',
      component: MyOrder,
      meta:{
        isRequire:true
      }
    },
  ]
})
